adblock: update 4.4.5-2
authorDirk Brenken <[email protected]>
Mon, 15 Dec 2025 21:58:34 +0000 (22:58 +0100)
committerDirk Brenken <[email protected]>
Mon, 15 Dec 2025 21:58:34 +0000 (22:58 +0100)
* fixed f_uci function
* fixed f_switch function, reported in the turris forum

Signed-off-by: Dirk Brenken <[email protected]>
net/adblock/Makefile
net/adblock/files/adblock.sh

index d525dfbc207a892f7fc68e1a45225e37c4fddc94..60163f89149ed5fd3d6aea28e30cb40eec6d7f76 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.4.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <[email protected]>
 
index 445108d0964a473af87697ed487c9dae0ae97e10..c1b4cb1237ba58335eba01a09e9b91ae5e10c668 100755 (executable)
@@ -531,7 +531,7 @@ f_rmdns() {
 f_uci() {
        local config="${1}"
 
-       if [ -n "${config}" ]; then
+       if [ -n "$(uci -q changes "${config}")" ]; then
                uci_commit "${config}"
                case "${config}" in
                        "firewall")
@@ -1027,11 +1027,11 @@ f_switch() {
        elif [ "${status}" = "paused" ] && [ "${mode}" = "resume" ]; then
                if [ "${adb_dnsshift}" = "0" ] && [ -f "${adb_backupdir}/${adb_dnsfile}" ]; then
                        mv -f "${adb_backupdir}/${adb_dnsfile}" "${adb_finaldir}/${adb_dnsfile}"
-                       f_count "switch" "${adb_finaldir}/${adb_dnsfile}"
+                       f_count "final" "${adb_finaldir}/${adb_dnsfile}"
                        done="true"
                elif [ "${adb_dnsshift}" = "1" ] && [ ! -L "${adb_finaldir}/${adb_dnsfile}" ]; then
                        ln -fs "${adb_finaldir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
-                       f_count "switch" "${adb_finaldir}/${adb_dnsfile}"
+                       f_count "final" "${adb_finaldir}/${adb_dnsfile}"
                        done="true"
                fi
        fi
@@ -1040,7 +1040,7 @@ f_switch() {
                f_jsnup "${mode}"
                f_log "info" "${mode} adblock service"
        else
-               f_count "switch" "${adb_finaldir}/${adb_dnsfile}"
+               f_count "final" "${adb_finaldir}/${adb_dnsfile}"
                f_jsnup "${status}"
        fi
        f_rmtemp